var Promise = require('promise');
var csrf = require('csurf');
var csrfProtection = csrf({ cookie: true });
module.exports = function (app) {
    app.all('/biz/*',csrfProtection, function(req, res, next){
        res.locals._csrf = req.csrfToken();
        next();
    });
    ////登陆
    app.use('/shoot/login',require('./src/shoot/router/login'));
    //文章
    app.use('/shoot/article',require('./src/shoot/router/article'));
    //新闻
    app.use('/shoot/news',require('./src/shoot/router/news'));
    //公共
    app.use('/shoot/common',require('./src/shoot/router/common'));
    //用户
    app.use('/shoot/member',require('./src/shoot/router/member'));
    //活动
    app.use('/shoot/activity',require('./src/shoot/router/activity'));
    //评论
    app.use('/shoot/comment',require('./src/shoot/router/comment'));
};
